<?php /* Smarty version 2.6.14, created on 2014-11-10 14:07:31
         compiled from acl.privilege.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'in_array', 'acl.privilege.html', 37, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<form action="<?php echo $this->_tpl_vars['formAction']; ?>
" method="POST" <?php if ($this->_tpl_vars['is_validator']): ?> id="adminform" onsubmit="return Validator.Validate(this)" <?php endif; ?>>
<script type="text/javascript">
<!--
    function select_acl(top_id, t){
        var type	=	$(t).attr('checked');
        if(!type){
            type=false;
        }
        if(top_id == 169){
            $("input[name='acl_id[]']").each(function(){
                $(this).attr('checked',type);
            });
        }else{
            $(".level"+top_id).each(function(){
                $(this).attr('checked',type);
            });
        }
    }
//-->
</script>
<div style="padding:10px;">
<fieldset>
	<legend><?php echo $this->_tpl_vars['systemLang']['authorizedUserGroup']; ?>
</legend>
    <ul class="aclList">
    <?php $_from = $this->_tpl_vars['userGroup']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['level_1']):
?>   
    <li>
        <input type="checkbox" name="group_id[]"  value="<?php echo $this->_tpl_vars['level_1']['group_id']; ?>
" <?php if ($this->_tpl_vars['level_1']['group_id'] == $this->_tpl_vars['group_id']): ?> readonly='readonly' CHECKED="true" <?php else: ?> readonly=TRUE <?php endif; ?>><?php echo $this->_tpl_vars['level_1']['group_value']; ?>

    </li>
    <?php endforeach; endif; unset($_from); ?>
    </ul>
</fieldset>
<div>
<?php $_from = $this->_tpl_vars['acl']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['level_1']):
?>
<fieldset>
	<legend>
        <input type="checkbox" name="acl_id[]" onclick="select_acl(<?php echo $this->_tpl_vars['level_1']['acl_id']; ?>
,this)" value="<?php echo $this->_tpl_vars['level_1']['acl_id']; ?>
" id="acl_<?php echo $this->_tpl_vars['level_1']['acl_id']; ?>
" <?php if (((is_array($_tmp=$this->_tpl_vars['level_1']['acl_id'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['myacl']) : in_array($_tmp, $this->_tpl_vars['myacl']))): ?> CHECKED="true"<?php endif; ?>><?php echo $this->_tpl_vars['level_1']['acl_name']; ?>

    </legend>
        <?php $_from = $this->_tpl_vars['acl_child'][$this->_tpl_vars['level_1']['acl_id']]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['level_2']):
?>
            <fieldset>
                <legend>
                    <input type="checkbox" name="acl_id[]" onclick="select_acl(<?php echo $this->_tpl_vars['level_2']['acl_id']; ?>
,this)" value="<?php echo $this->_tpl_vars['level_2']['acl_id']; ?>
" id="acl_<?php echo $this->_tpl_vars['level_1']['acl_id']; ?>
_<?php echo $this->_tpl_vars['level_2']['acl_id']; ?>
" <?php if (((is_array($_tmp=$this->_tpl_vars['level_2']['acl_id'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['myacl']) : in_array($_tmp, $this->_tpl_vars['myacl']))): ?> CHECKED="true"<?php endif; ?>><?php echo $this->_tpl_vars['level_2']['acl_name']; ?>

                </legend>
                <ul class="aclList">
                        <?php $_from = $this->_tpl_vars['acl_child'][$this->_tpl_vars['level_2']['acl_id']]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['level_3']):
?>
                        <li>
                            <input type="checkbox" name="acl_id[]" class="level<?php echo $this->_tpl_vars['level_2']['acl_id']; ?>
" value="<?php echo $this->_tpl_vars['level_3']['acl_id']; ?>
" <?php if (((is_array($_tmp=$this->_tpl_vars['level_3']['acl_id'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['myacl']) : in_array($_tmp, $this->_tpl_vars['myacl']))): ?> CHECKED="true" <?php endif; ?> id="acl_<?php echo $this->_tpl_vars['level_1']['acl_id']; ?>
_<?php echo $this->_tpl_vars['level_2']['acl_id']; ?>
_<?php echo $this->_tpl_vars['level_3']['acl_id']; ?>
"><?php echo $this->_tpl_vars['level_3']['acl_name']; ?>

                        <?php endforeach; endif; unset($_from); ?>
                </ul>
           </fieldset>
        <?php endforeach; endif; unset($_from); ?>
</fieldset>
<?php endforeach; endif; unset($_from); ?>
</div>
</div>
<div style="padding:5px; clear:both;">
<input type="submit" value="<?php echo $this->_tpl_vars['systemLang']['authorized']; ?>
" name="submit" class="button" />
</div>
</form>